
package org.wmine.algo;

import javax.swing.*;
import org.wmine.core.MainWindow;
import org.wmine.core.BasicTabPanel;
import org.wmine.core.WMineConstants;
import javax.swing.JTable.*;
import javax.swing.table.*;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.TableModel;

import java.util.*;
public class InputWindow
{
	String filename;
	InputWindow(String viewfile)
	{
		filename=viewfile;
	}
	public JPanel getInputWindow()
	{
		
		JPanel p=new JPanel();			
		//for studentdataset.xml
	/*	Vector v1=new Vector();
		v1.add(new String("Anu1"));
		v1.add(new String("Anu2"));
		v1.add(new String("Anu3"));
		
		Vector v11=new Vector();
		v11.add(new String("Anu11"));
		v11.add(new String("Anu21"));
		//v11.add(new String("Anu3"));
		
		JTable jt =new JTable(v1,v11);*/
		
		
		//JTable jt =new JTable(30,5);
//		jt.se
		//JScrollPane jsp=jt.createScrollPaneForTable(jt);
			JTable tableData;
	//JScrollPane scrollPane;	
	DefaultTableModel dtm;
	String dataValues[][]=new String[4][6];;
	String[] columnNames={"Roll No","Name","Maths","Science","Civics","Geography"};
	dataValues[0][0]="1";
	dataValues[0][1]="Anu1";
	dataValues[0][2]="80";
	dataValues[0][3]="90";
	dataValues[0][4]="60";
	dataValues[0][5]="60";
	
		dataValues[1][0]="2";
	dataValues[1][1]="Anu2";
	dataValues[1][2]="80";
	dataValues[1][3]="90";
	dataValues[1][4]="60";
	dataValues[1][5]="60";
	
		dataValues[2][0]="3";
	dataValues[2][1]="Anu3";
	dataValues[2][2]="80";
	dataValues[2][3]="90";
	dataValues[2][4]="60";
	dataValues[2][5]="60";
	
		dataValues[3][0]="4";
	dataValues[3][1]="Anu4";
	dataValues[3][2]="80";
	dataValues[3][3]="90";
	dataValues[3][4]="60";
	dataValues[3][5]="60";
	
			dtm=new DefaultTableModel(dataValues,columnNames);
		 		tableData = new JTable(dtm);
		 		tableData.setEnabled(false);
	JScrollPane jsp=new JScrollPane(tableData,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	
	
		p.add(jsp);
		
		return p;
	}	
	
}